package com.southminority.ethnic.controller.contact.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 联系留言视图对象
 * 
 * @author SouthMinority
 */
@Data
@Schema(description = "联系留言视图对象")
public class ContactVO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 联系ID
     */
    @Schema(description = "联系ID", example = "1")
    private Long id;

    /**
     * 姓名
     */
    @Schema(description = "联系人姓名", example = "张三", required = true, maxLength = 100)
    private String name;

    /**
     * 邮箱
     */
    @Schema(description = "联系人邮箱", example = "zhangsan@example.com", format = "email", maxLength = 100)
    private String email;

    /**
     * 电话
     */
    @Schema(description = "联系人电话", example = "13800138000", maxLength = 20)
    private String phone;

    /**
     * 所属机构
     */
    @Schema(description = "联系人所属机构", example = "贵州民族大学", maxLength = 200)
    private String organization;

    /**
     * 主题
     */
    @Schema(description = "联系主题", example = "项目合作咨询", maxLength = 200)
    private String subject;

    /**
     * 留言内容
     */
    @Schema(description = "留言内容", example = "希望与实验室进行学术交流合作", required = true)
    private String message;

    /**
     * 联系类型
     */
    @Schema(description = "联系类型编码", example = "cooperation", 
            allowableValues = {"consultation", "cooperation", "suggestion", "complaint", "research", "other"})
    private String contactType;

    /**
     * 联系类型显示名称
     */
    @Schema(description = "联系类型显示名称", example = "项目合作", accessMode = Schema.AccessMode.READ_ONLY)
    private String contactTypeDisplay;

    /**
     * IP地址
     */
    @Schema(description = "提交者IP地址", example = "192.168.1.100", accessMode = Schema.AccessMode.READ_ONLY)
    private String ipAddress;

    /**
     * 用户代理
     */
    @Schema(description = "用户代理信息", example = "Mozilla/5.0...", accessMode = Schema.AccessMode.READ_ONLY)
    private String userAgent;

    /**
     * 回复内容
     */
    @Schema(description = "管理员回复内容", example = "感谢您的联系，我们会尽快回复", accessMode = Schema.AccessMode.READ_ONLY)
    private String replyContent;

    /**
     * 回复时间
     */
    @Schema(description = "回复时间", example = "2024-01-15T10:30:00", accessMode = Schema.AccessMode.READ_ONLY)
    private LocalDateTime replyTime;

    /**
     * 回复时间字符串
     */
    @Schema(description = "回复时间字符串", example = "2024-01-15 10:30:00", accessMode = Schema.AccessMode.READ_ONLY)
    private String replyTimeStr;

    /**
     * 回复人ID
     */
    @Schema(description = "回复人ID", example = "1", accessMode = Schema.AccessMode.READ_ONLY)
    private Long replyUserId;

    /**
     * 回复人姓名
     */
    @Schema(description = "回复人姓名", example = "管理员", accessMode = Schema.AccessMode.READ_ONLY)
    private String replyUserName;

    /**
     * 状态
     */
    @Schema(description = "处理状态", example = "0", 
            allowableValues = {"0", "1", "2", "-1"},
            accessMode = Schema.AccessMode.READ_ONLY)
    private Integer status;

    /**
     * 状态显示名称
     */
    @Schema(description = "状态显示名称", example = "待处理", 
            allowableValues = {"待处理", "已处理", "已回复", "已删除"},
            accessMode = Schema.AccessMode.READ_ONLY)
    private String statusDisplay;

    /**
     * 是否已回复
     */
    @Schema(description = "是否已回复", example = "false", accessMode = Schema.AccessMode.READ_ONLY)
    private Boolean hasReply;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间", example = "2024-01-15T09:00:00", accessMode = Schema.AccessMode.READ_ONLY)
    private LocalDateTime createTime;

    /**
     * 创建时间字符串
     */
    @Schema(description = "创建时间字符串", example = "2024-01-15 09:00:00", accessMode = Schema.AccessMode.READ_ONLY)
    private String createTimeStr;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间", example = "2024-01-15T10:30:00", accessMode = Schema.AccessMode.READ_ONLY)
    private LocalDateTime updateTime;
} 